# Maintainer: Johannes Schindelin/Matthew J Cheetham

_realname="git-credential-manager-core"
pkgbase="mingw-w64-${_realname}"
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=2.0.194.40577
pkgrel=1
_realver=$pkgver
_realtag=v${pkgver%.*}-beta
pkgdesc="Credential Manager for Git"
arch=('any')
project_url="https://github.com/microsoft/Git-Credential-Manager-Core"
zip_url="${project_url}/releases/download/${_realtag}/gcmcore-win-x86-${_realver}.zip"
src_zip_url="${project_url}/archive/${_realtag}.zip"
license=('MIT')
groups=('VCS')

source=("${zip_url}" "$src_zip_url")

sha256sums=('2429770aa1f3b353c31a6c02ee1175beb6e1046a894d7883b1362cf513e677b8'
            'a475b469a31ded07ebfd1c99b96024cf20ffed980fe561f3c8a5fe1e39666c86')

package() {
  prefix="$pkgdir/${MINGW_PREFIX}"
  srcdir2="${srcdir}/"
  install -d -m755 "${prefix}"/libexec/git-core
  install -m755 "$srcdir2"/*.{dll,exe,config} "${prefix}"/libexec/git-core
  install -d -m755 "${prefix}"/doc/git-credential-manager-core
  install -m644 "$srcdir2"/Git-Credential-Manager-Core-${_realtag#v}/{README.md,LICENSE,NOTICE} "${prefix}"/doc/git-credential-manager-core
}
